package com.day0928;
// 完整的JavaBean  无参构造 有参构造  get set方法  toString方法
public class Teacher {
    private String name;
    private int age;
    private String hobby;

    public Teacher() {
    }

    public Teacher(String name, int age, String hobby) {
        this.name = name;
        this.age = age;
        this.hobby = hobby;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    // toString   快捷键 alt + ins
    @Override
    public String toString() {
        return "Teacher{" + "name='" + name + '\'' + ", age=" + age + ", hobby='" + hobby + '\'' + '}';
    }
}
